﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<HTML lang="en">

	<HEAD>
		<META content="IE=10.000" http-equiv="X-UA-Compatible">

		<META charset="utf-8">
		<META name="viewport" content="width=device-width, initial-scale=1.0">
		<TITLE>运营管理后台</TITLE>
		<!-- CSS -->
		<LINK href="css/OpenSans.css" rel="stylesheet" type="text/css">
		<LINK href="css/bootstrap.min.css" rel="stylesheet">
		<LINK href="css/jasny-bootstrap.min.css" rel="stylesheet">
		<LINK href="css/font-awesome.css" rel="stylesheet" type="text/css">
		<LINK href="css/daterangepicker-bs3.css" rel="stylesheet" type="text/css">
		<LINK href="css/datepicker.css" rel="stylesheet" type="text/css">
		<LINK href="css/select2.css" rel="stylesheet" type="text/css">
		<LINK href="css/select2-bootstrap.css" rel="stylesheet" type="text/css">
		<LINK href="css/uniform.default.min.css" rel="stylesheet" type="text/css">
		<!--<link href="scripts/css/prettify.css" rel="stylesheet" type="text/css" />
        <link href="http://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.10/css/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />-->
		<LINK href="css/fullcalendar.css" rel="stylesheet">
		<LINK href="css/fullcalendar.print.css" rel="stylesheet" media="print">
		<LINK href="css/toastr.min.css" rel="stylesheet">
		<LINK href="css/ark.css" rel="stylesheet" type="text/css">
		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
            <script src="/manager/js/html5shiv.js"></script>
            <script src="/manager/js/respond.min.js"></script>
        <![endif]-->

		<SCRIPT src="js/jquery.min.js"></SCRIPT>

		<META name="GENERATOR" content="MSHTML 10.00.9200.17457">
	</HEAD>

	<BODY class="cover">
		<DIV class="wrapper">
			<!-- HEAD NAV -->
			<DIV class="navbar navbar-default navbar-static-top navbar-main" role="navigation">
				<DIV class="navbar-header">
					<A class="navbar-brand" href="#">
						运营管理后台</A>
				</DIV>
				<UL class="nav navbar-nav navbar-left">
					<LI class="sidemenu-switch">
						<A href="#">
							<SPAN class="sr-only">Toggle navigation</SPAN>
							<I class="fa fa-bars"></I>
						</A>
					</LI>
				</UL>
				<UL class="nav navbar-nav navbar-right">
					<LI class="visible-xs">
						<A class="navbar-toggle" href="#" data-toggle="collapse" data-target=".sidebar">
							<SPAN class="sr-only">Toggle 
  navigation</SPAN>
							<I class="fa fa-bars"></I> </A>
					</LI>
					<LI class="dropdown">
						<A class="dropdown-toggle avatar pull-right" href="#" data-toggle="dropdown">
							<SPAN class="hidden-small">管理员<B 
  class="caret"></B></SPAN> </A>
						<UL class="dropdown-menu pull-right">
							<LI>
								<A href="#">
									<I class="fa fa-sign-out"></I>退出登录</A>
							</LI>
						</UL>
					</LI>
				</UL>
			</DIV>
			<!-- END: HEAD NAV -->
			<!-- BODY -->
			<DIV class="body">
				<!-- SIDEBAR -->
				<!-- SIDEBAR -->
				<ASIDE class="sidebar">
					<UL class="nav nav-stacked">
						<LI class="menu">
							<A class="menu-toggle" href="#">
								<I class="fa fa-users fa-fw"></I>
								<SPAN class="item-label">玩家管理<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI class="active">
									<A href="user-list.html">
										<I class="fa fa-sort-alpha-asc fa-fw"></I>
										<SPAN>玩家列表</SPAN>
									</A>
								</LI>
								<LI>
									<A href="usergame-list.html">
										<I class="fa fa-list fa-fw"></I>
										<SPAN>玩家游戏统计</SPAN>
									</A>
								</LI>
								<LI>
									<A href="user-gold.html">
										<I class="fa fa-support fa-fw"></I>
										<SPAN>金币记录</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
					
						
						<LI class="menu ">
							<A class="menu-toggle" href="#/user/users">
								<I class="fa fa-user fa-fw"></I>
								<SPAN class="item-label">系统用户<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="user-manage.html">
										<I class="fa fa-sort-alpha-asc fa-fw"></I>
										<SPAN>用户管理</SPAN>
									</A>
								</LI>
								<LI>
									<A href="#">
										<I class="fa fa-th-large fa-fw"></I>
										<SPAN>角色与权限</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/user/users">
								<I class="fa fa-phone fa-fw"></I>
								<SPAN class="item-label">客户服务<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="#">
										<I class="fa fa-credit-card fa-fw"></I>
										<SPAN>会员反馈处理</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/user/users">
								<I class="fa fa-adn fa-fw"></I>
								<SPAN class="item-label">应用管理<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="#/app/notices">
										<I class="fa fa-bullhorn fa-fw"></I>
										<SPAN>公告设置</SPAN>
									</A>
								</LI>
								<LI>
									<A href="#/app/apps">
										<I class="fa fa-android fa-fw"></I>
										<SPAN>版本管理</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/player/players#">
								<I class="fa fa-header fa-fw"></I>
								<SPAN class="item-label">活动管理<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="#/activity/activities">
										<I class="fa fa-sort-alpha-asc fa-fw"></I>
										<SPAN>活动列表</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/player/players#">
								<I class="fa fa-bar-chart-o fa-fw"></I>
								<SPAN class="item-label">数据统计<I class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="richest-player.html">
										<I class="fa fa-users fa-fw"></I>
										<SPAN>玩家排名统计</SPAN>
									</A>
								</LI>
								
							</UL>
						</LI>
						<LI class="menu ">
							<A class="menu-toggle" href="#/player/players#">
								<I class="fa fa-sliders fa-fw"></I>
								<SPAN class="item-label">系统管理<I 
  class="caret"></I></SPAN>
							</A>
							<UL class="submenu">
								<LI>
									<A href="#/system/logs">
										<I class="fa fa-history fa-fw"></I>
										<SPAN>系统日志</SPAN>
									</A>
								</LI>
								<LI>
									<A href="#/player/players#">
										<I class="fa fa-cloud fa-fw"></I>
										<SPAN>系统监控</SPAN>
									</A>
								</LI>
							</UL>
						</LI>
					</UL>
				</ASIDE>
				<!-- END: SIDEBAR -->
				<!-- END: SIDEBAR -->
				<SECTION class="content">
					<OL class="breadcrumb">
						<LI>
							<I class="fa fa-users fa-fw"></I>玩家排名统计</LI>
					</OL>
					<!-- CONTENT -->
					<DIV class="main-content">
						<UL class="nav nav-tabs" role="tablist">
							<LI class="active">
								<A href="#count/player/sort">所有区域</A>
							</LI>
							<LI>
								<A href="#count/player/sort/heishan">黑山</A>
							</LI>
							<LI>
								<A href="#count/player/sort/quyang">曲阳</A>
							</LI>
						</UL>
						<BR>
						<DIV class="row">
							<DIV class="col-md-4 col-sm-4">
								<DIV class="form-group">
									<INPUT name="agent" class="form-control" type="number" min="1" placeholder="代理ID" value="">
								</DIV>
							</DIV>
							<DIV class="col-md-4 col-sm-4">
								<DIV class="form-group">
									<INPUT name="id" class="form-control" type="number" min="1" placeholder="玩家ID、账号" value="">
								</DIV>
							</DIV>
							<DIV class="col-md-2 col-sm-2">
								<DIV class="checkbox">
									<LABEL><INPUT name="android" type="checkbox"> 含机器人         
      </LABEL> </DIV>
							</DIV>
							<DIV class="col-md-2 col-sm-2 text-right">
								<A class="btn btn-primary" href="javascript:goPage(1)">搜索</A>
							</DIV>
						</DIV>
						<DIV class="row">
							<DIV class="col-md-4">
								<INPUT name="timeStart" class="form-control datepicker" id="ark-ex-datepicker" type="text" placeholder="开始时间" value="" data-date-format="yyyy-mm-dd">
							</DIV>
							<DIV class="col-md-4">
								<INPUT name="timeEnd" class="form-control datepicker" id="ark-ex-datepicker" type="text" placeholder="结束时间" value="" data-date-format="yyyy-mm-dd">
							</DIV>
							<DIV class="col-md-4"></DIV>
						</DIV>
						<DIV class="row">
							<H4 class="col-md-4">玩家排名统计</H4>
						</DIV>
						<DIV class="row">
							<DIV class="col-md-12" role="dataResult">
								<TABLE class="table table-hover table-striped dataTable">
									<THEAD>
										<TR>
											<TH>序号</TH>
											<TH>区域</TH>
											<TH>帐号</TH>
											<TH>昵称</TH>
											<TH>性别</TH>
											<TH class="sorting" id="up-Down-img-roomcardExpenses" data-by="DESC" data-role="upDown" data-order="roomcard_expenses">房卡消耗</TH>
											<TH class="sorting" id="up-Down-img-roomcard" data-by="DESC" data-role="upDown" data-order="roomcard">房卡剩余</TH>
											<TH class="sorting" id="up-Down-img-scoreExpenses" data-by="DESC" data-role="upDown" data-order="score_expenses">积分消耗</TH>
											<TH class="sorting" id="up-Down-img-scoreIncome" data-by="DESC" data-role="upDown" data-order="scoreincome">积分增加</TH>
											<TH class="sorting" id="up-Down-img-score" data-by="DESC" data-role="upDown" data-order="score">积分剩余</TH>
											<TH class="sorting" id="up-Down-img-goldExpenses" data-by="DESC" data-role="upDown" data-order="gold_expenses">金币消耗</TH>
											<TH class="sorting" id="up-Down-img-goldBuy" data-by="DESC" data-role="upDown" data-order="gold_buy">金币购买</TH>
											<TH class="sorting" id="up-Down-img-goldIncome" data-by="DESC" data-role="upDown" data-order="gold_income">金币增加</TH>
											<TH class="sorting" id="up-Down-img-gold" data-by="DESC" data-role="upDown" data-order="gold">金币剩余</TH>
											<TH class="sorting" id="up-Down-img-masterScore" data-by="DESC" data-role="upDown" data-order="master_score">大师分</TH>
										</TR>
									</THEAD>
									<TBODY>
										<TR>
											<TD class="text-center" style="text-align: center;" colspan="20">未找到任何数据</TD>
										</TR>
									</TBODY>
								</TABLE>
								<INPUT id="page" type="hidden" value="1">
								<UL class="pagination pagination-sm pull-left no-bottom-margin no-top-margin" role="pagination">
									<LI class="disabled">
										<A href="#count/player/sort#">«</A>
									</LI>
									<LI class="disabled">
										<A href="#count/player/sort#">1</A>
									</LI>
									<LI class="disabled">
										<A href="#count/player/sort#">»</A>
									</LI>
								</UL>
								<DIV class="modal fade" id="sureModal" role="dialog" style="z-index: 10000;">
									<DIV class="modal-dialog modal-sm">
										<DIV class="modal-content">
											<DIV class="modal-header">
												<H4 class="modal-title">确认要进行此操作吗?</H4>
											</DIV>
											<DIV class="modal-footer no-border" data-role="footer">
												<BUTTON class="btn btn-default" data-dismiss="modal">取消</BUTTON>
												<BUTTON class="btn btn-success confirm">确定</BUTTON> </DIV>
											<DIV class="modal-footer no-border" style="display: none;" data-role="loading">
												<IMG src="css/loading.gif">
											</DIV>
										</DIV>
									</DIV>
								</DIV>
								<SCRIPT type="text/javascript">
									function _confirmModal(evn, title, notClose) {
										$('#sureModal').modal('show');
										$('#sureModal .btn-success').unbind('click');
										$('#sureModal .btn-success').on('click', function() {
											evn();
											if(!notClose) {
												$('#sureModal').modal('hide');
												$('.modal-backdrop').hide();
											}
										});
										if(title) {
											$('#sureModal .modal-title').html(title);
										} else {
											$('#sureModal .modal-title').html('确认要进行此操作吗？');
										}
									}
								</SCRIPT>

								<SCRIPT type="text/javascript">
									$('ul[role=pagination] li').on('click', function() {
										var page = $(this).attr('data-page');
										if(page && !isNaN(parseInt(page))) {
											goPage(page);
										}
									});
								</SCRIPT>
							</DIV>
							<DIV class="col-md-12 center-block text-center" role="dataLoading" style="display: none;">
								<IMG src="css/loading.gif"> </DIV>
						</DIV>
					</DIV>
					<!-- END: CONTENT -->
				</SECTION>
			</DIV>
			<!-- END: BODY -->
		</DIV>
		<!-- JS -->
		<SCRIPT src="js/jquery-ui.min.js"></SCRIPT>

		<SCRIPT src="js/jquery.uniform.min.js"></SCRIPT>

		<SCRIPT src="js/bootstrap.min.js"></SCRIPT>

		<SCRIPT src="js/jasny-bootstrap.min.js"></SCRIPT>

		<SCRIPT src="js/jquery.autosize.min.js"></SCRIPT>

		<SCRIPT src="js/moment.min.js"></SCRIPT>

		<SCRIPT src="js/daterangepicker.js"></SCRIPT>

		<SCRIPT src="js/bootstrap-datepicker.js"></SCRIPT>

		<SCRIPT src="js/fullcalendar.min.js"></SCRIPT>
		<!-- <script src="/manager/vendor/dropzone/dist/min/dropzone.min.js"></script> -->
		<SCRIPT src="js/select2.min.js"></SCRIPT>

		<SCRIPT src="js/base.js"></SCRIPT>
		<!-- <script src="/manager/js/ark.js"></script> -->
		<SCRIPT src="js/toastr.min.js"></SCRIPT>

		<SCRIPT src="js/admin.js"></SCRIPT>

		<SCRIPT type="text/javascript">
			$('form').on('submit', function(e) {
				e.preventDefault();
				goPage(1);
			})
			/* 分页*/
			function goPage(number) {
				$('div[role=dataResult]').hide();
				$('div[role=dataLoading]').show();
				var name = $('input[name=name]').val();
				var id = $('input[name=id]').val();
				var url = '?page=' + number + '&name=' + name + '&id=' + id;
				$.ajax({
					url: url,
					type: 'get',
					success: function(result) {
						$('div[role=dataResult]').show();
						$('div[role=dataLoading]').hide();
						$('div[role=dataResult]').html(result)
					}
				})
			}
			$('body').on('click', 'th[data-role=upDown]', function(e) {
				var order = e.currentTarget.dataset.order
				var by = e.currentTarget.dataset.by
				var area = e.currentTarget.dataset.area
				var src_img = e.currentTarget.className
				var url = '/count/player/sort/' + order + '/' + by
				if(area) {
					url = '/count/player/sort/' + order + '/' + by + '/' + area
				}
				if(src_img == 'sorting_desc' || src_img == 'sorting') {
					$.get(url, function(result) {
						$('div[role=dataResult]').html(result);
						$("#up-Down-img-" + order).attr("class", "sorting_asc")
					})
				} else if(src_img == 'sorting_asc') {
					$.get(url, function(result) {
						$('div[role=dataResult]').html(result);
						$("#up-Down-img-" + order).attr("class", "sorting_desc")
					})
				}
			})
		</SCRIPT>
	</BODY>

</HTML>